﻿using AiMoBridge.Interface.Client;
using AiMoToServer.Entrance;

namespace AiMoWindows.Server
{
    static class GetClient
    {
        public static bool Inited { get; } = Init();
        static bool Init()
        {
            ServerInfo.SetAiMoVersion(Version.version);
            return true;
        }
        public static IAiAskClient GetAiAskClient()
        {
            IAiAskClient client = AiMoToServerGetter.GetAiAskClientToAiMoServer();
            return client;
        }
        public static ICheckUpdateClient GetCheckUpdateClient()
        {
            ICheckUpdateClient client = AiMoToServerGetter.GetCheckUpdateClientToAiMoServer();
            return client;
        }
        public static IUploadShareCodeClient GetUploadShareCodeClient()
        {
            IUploadShareCodeClient client = AiMoToServerGetter.GetUploadShareCodeClientToAiMoServer();
            return client;
        }

        public static ILoginClient GetLoginClient()
        {
            if (!Inited) { }
            ILoginClient client = AiMoToServerGetter.GetLoginClientToAiMoServer();
            return client;
        }

        public static IDownloadShareCodeClient GetDownloadShareCodeClient()
        {
            IDownloadShareCodeClient client = AiMoToServerGetter.GetDownloadShareCodeClientToAiMoServer();
            return client;

        }
    }
}
